//
//  NewSongCollectionViewCell.m
//  LoveToListen
//
//  Created by dllo on 16/3/28.
//  Copyright © 2016年 LanOu. All rights reserved.
//

#import "NewSongCollectionViewCell.h"

@implementation NewSongCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.coverPic = [[UIImageView alloc] init];
        [self.contentView addSubview:_coverPic];
        self.name = [[UILabel alloc] init];
        [self.contentView addSubview:_name];
        
        
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes{
    self.coverPic.frame = CGRectMake(0, 0, layoutAttributes.bounds.size.width, 115);
    
    _name.frame = CGRectMake(_coverPic.frame.origin.x, _coverPic.frame.origin.y + _coverPic.frame.size.height + 5, _coverPic.frame.size.width, layoutAttributes.bounds.size.height - _coverPic.frame.size.height);
    _name.numberOfLines = 2;
}
@end
